<template>
	<view>
		<view class="item u-flex u-col-center u-row-between" v-if="!currentType">
			<view class="u-flex u-col-center">
				<view class="icon-90 u-flex u-col-center u-row-center">
					<image class="" src="../../../static/images/chick7.png" mode=""></image>
				</view>
				<view class="">
					<view class="lable">待配送肉鸡</view>
					<view class="desc">{{data.num}}只</view>
				</view>
			</view>
			<view class="delivery-btn" @click="show">立即配送</view>
		</view>
		<view class="item u-flex u-col-center u-row-between" v-else>
			<view class="u-flex u-col-center">
				<view class="icon-90 u-flex u-col-center u-row-center">
					<image class="" src="../../static/images/chick7.png" mode=""></image>
				</view>
				<view class="">
					<view class="lable">
						肉鸡
					</view>
					<view class="desc">
						{{data.num}}只
					</view>
				</view>
			</view>
			<view class="delivery-btn">
				<navigator :url="`/mine/orderDetail/orderDetail?order_id=${data.order_id}`">
					查看订单
				</navigator>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'name',
		props: {
			item: {
				type: Object,
				default () {
					return {}
				}
			},
			type: {
				type: [Number, String],
				default () {
					return 0
				}
			},

		},
		computed: {
			data() {
				return this.item
			},
			currentType() {
				return this.type
			}
		},
		data() {
			return {};
		},
		methods: {
			show() {
				this.$u.vuex("vuex_delivery",this.data)
				this.$emit('hideAddressMadal')
			}
		}
	};
</script>

<style>
	.item {
		padding: 28rpx 28rpx 28rpx 38rpx;
		box-sizing: border-box;
		margin-bottom: 18rpx;
	}

	.icon-90 {
		width: 90rpx;
		height: 90rpx;
		/* background:rgba(162,229,216,1); */
		border: 3rpx solid rgba(253, 181, 68, 1);
		border-radius: 50%;
		margin-right: 32rpx;
	}

	.icon-90 image {
		width: 62rpx;
		height: 68rpx;
	}

	.lable {
		font-size: 32rpx;
		margin-bottom: 20rpx;
	}

	.desc {
		color: #999999;
		font-size: 28rpx;
	}

	.delivery-btn {
		width: 200rpx;
		height: 60rpx;
		background: rgba(245, 179, 64, 1);
		border: 3rpx solid rgba(204, 126, 43, 1);
		border-radius: 20rpx;
		color: #ffffff;
		text-align: center;
		line-height: 60rpx;
	}
</style>
